package com.ivan.feign.cmn;

import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/*
 * @Author      Ivan
 * @Date        2023/4/4 15:13
 * @Description
 */
@FeignClient(value = "service-cmn/admin/cmn/dict")
@Repository
public interface DictFeignClient {

    @ApiOperation(value = "根据dictcode和value查询")
    @GetMapping("/getNameByDictCodeAndValue/{dictCode}/{value}")
    public String getNameByDictCodeAndValue(@PathVariable("dictCode") String dictCode,
                                            @PathVariable("value") String value);

    @ApiOperation(value = "根据value查询")
    @GetMapping("/getNameByValue/{value}")
    public String getNameByValue(@PathVariable("value") String value);
}
